
#  self对象 。

class Students():

    # 定义属性
    name = "张三"
    age = 12
    grade = '5年级'

    # 定义方法
    def study(self):
        print("这里的self是:",self)
        print("{}正在学习，目前处于{}年级".format(self.name,self.grade))


# 初始化对象
s1 = Students()
print("学生名字:",s1.name)
s1.study()
print("这里的s1是:",s1)

print("="* 30)
s2 = Students()
s2.name = '李四'
s2.grade = '6年级'
s2.age = 13
print("学生2姓名:",s2.name)
s2.study()
print("这里的s2是:",s2)